import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Collections;
import java.util.Comparator;

public class bookstream {
    public static void main(String[] args){
        List<bookname>men= Arrays.asList(
                new bookname("红楼梦",161),
                new bookname("三国演义",99),
                new bookname("水浒传",101),
                new bookname("西游记",143),
                new bookname("三体",111),
                new bookname("三体2",130));
        List<String>low=men.stream()
                .filter(d->d.getMoney()>100)
                // .sorted((d1,d2)->d1.getMoney()- d2.getMoney())
                .sorted(Comparator.comparing(bookname::getMoney).reversed())//对列表进行降排序
                .map(d->d.getName())
                .collect(Collectors.toList());

        for (String name:low)
            System.out.println("书名:"+name);
    }
}
